package com.numberone.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.numberone.system.mapper.AboutHonorMapper;
import com.numberone.system.domain.AboutHonor;
import com.numberone.system.service.IAboutHonorService;
import com.numberone.common.support.Convert;

/**
 * 企业荣誉 服务层实现
 * 
 * @author numberone
 * @date 2020-09-27
 */
@Service
public class AboutHonorServiceImpl implements IAboutHonorService 
{
	@Autowired
	private AboutHonorMapper aboutHonorMapper;

	/**
     * 查询企业荣誉信息
     * 
     * @param id 企业荣誉ID
     * @return 企业荣誉信息
     */
    @Override
	public AboutHonor selectAboutHonorById(Long id)
	{
	    return aboutHonorMapper.selectAboutHonorById(id);
	}
	
	/**
     * 查询企业荣誉列表
     * 
     * @param aboutHonor 企业荣誉信息
     * @return 企业荣誉集合
     */
	@Override
	public List<AboutHonor> selectAboutHonorList(AboutHonor aboutHonor)
	{
	    return aboutHonorMapper.selectAboutHonorList(aboutHonor);
	}
	
    /**
     * 新增企业荣誉
     * 
     * @param aboutHonor 企业荣誉信息
     * @return 结果
     */
	@Override
	public int insertAboutHonor(AboutHonor aboutHonor)
	{
	    return aboutHonorMapper.insertAboutHonor(aboutHonor);
	}
	
	/**
     * 修改企业荣誉
     * 
     * @param aboutHonor 企业荣誉信息
     * @return 结果
     */
	@Override
	public int updateAboutHonor(AboutHonor aboutHonor)
	{
	    return aboutHonorMapper.updateAboutHonor(aboutHonor);
	}

	/**
     * 删除企业荣誉对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deleteAboutHonorByIds(String ids)
	{
		return aboutHonorMapper.deleteAboutHonorByIds(Convert.toStrArray(ids));
	}

	@Override
	public List<AboutHonor> query() {
		return aboutHonorMapper.selectByList();
	}

}
